﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BBPA.BLL
{
    public partial class User_Operate_Log
    {
        /// <summary>
        /// 添加用户操作记录
        /// </summary>
        /// <param name="UserID_"></param>
        /// <param name="TableName_"></param>
        /// <param name="RowID_"></param>
        /// <param name="Descriptopm_"></param>
        public static void Add(int UserID_, EnumHelper.TableName TableName_, int RowID_, EnumHelper.OperateType OperateType_, string Descriptopm_)
        {
            Model.User_Operate_Log modelLog = new Model.User_Operate_Log();
            modelLog.UserID = UserID_;
            modelLog.TableName = TableName_.ToString();
            modelLog.RowID = RowID_;
            modelLog.OperateType = (int)OperateType_;
            modelLog.URL = System.Web.HttpContext.Current.Request.Url.ToString();
            modelLog.IP = System.Web.HttpContext.Current.Request.ServerVariables.Get("Remote_Addr").ToString();
            modelLog.Description = Descriptopm_;
            BLL.User_Operate_Log bll = new User_Operate_Log();
            bll.Add(modelLog);
        }
    }
}
